{% extends 'base.html' %}
{% block header %}
    <link rel="stylesheet" href="{{ url_for('static',filename='css/base.css') }}">
{% endblock header %}

{% block content %}
    <!-- 表单 -->
    <div class="content">
        <div class="nav-tabs-custom">
            <ul class="nav nav-tabs">
                <li class="active"><a href="#" data-toggle="tab" aria-expanded="true">{{ title }}</a></li>
            </ul>
            <div class="box-header">
                <h3 class="box-title">
                    <a href="{{ url_for('admin.addarticle') }}" class="btn bg-olive btn-flat margin">添加文章</a>
                </h3>

            </div>
            <!-- /.box-header -->
            <div class="box-body no-padding">
                <table class="table table-hover table-bordered">
                    <tbody>
                    <tr>
                        <th style="width: 20px;"><input type="checkbox"></th>
                        <th>ID</th>
                        <th>文章标题</th>
                        <th>录入时间</th>
                        <th>分类</th>
                        <th>点击</th>
                        <th>发布人</th>
                        <th style="width:100px; text-align: center">操作</th>
                    </tr>
                    {% for article in result %}
                        <tr>
                            <td><input type="checkbox"></td>
                            <td>{{ article.id }}</td>
                            <td>{{ article.title }}</td>
                            <td>{{ article.addtime }}</td>
                            <td>{{ article.type_id }}</td>
                            <td>{{ article.click }}</td>
                            <td>{{ article.writer }}</td>
                            <td class="center">
                                <a href="#"><span class="badge bg-green">编辑</span></a>
                                <a href="#"><span class="badge bg-red">删除</span></a>
                            </td>
                        </tr>
                    {% endfor %}
                    </tbody>
                </table>
            </div>
            <!-- /.box-body -->
        </div>
        <!-- /.box -->
    </div>
    <!-- 表单 -->
{% endblock content %}